import { Component, OnInit } from '@angular/core';
import {$e} from 'codelyzer/angular/styles/chars';

@Component({
  selector: 'app-files',
  templateUrl: './files.component.html',
  styleUrls: ['./files.component.less']
})
export class FilesComponent implements OnInit {

  enterFilesShow = true;
  detailFilesShow: any = -1;

  constructor() { }

  ngOnInit(): void {
  }

  // 改变档案的显示
  changeEnterFilesShow(): void {
    this.enterFilesShow = !this.enterFilesShow;
  }

  // 改变查看档案详情的显示
  changeDetailFilesShow(): void {
    const index = window.sessionStorage.getItem('index');
    switch (index) {
      case '1':
        this.detailFilesShow = 1;
        break;
      case '2':
        this.detailFilesShow = 2;
        break;
      case '3':
        this.detailFilesShow = 3;
        break;
      case '4':
        this.detailFilesShow = 4;
        break;
      case '5':
        this.detailFilesShow = 5;
        break;
      case '-1':
        this.detailFilesShow = -1;
        break;
    }
  }

}
